-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: adding escalated status check #46
Conversation
solidity/contracts/modules/resolution/PrivateERC20ResolutionModule.sol
Outdated
Show resolved
Hide resolved
if (ORACLE.disputeStatus(_disputeId) != IOracle.DisputeStatus.None) { | ||
if ( | ||
ORACLE.disputeStatus(_disputeId) != IOracle.DisputeStatus.None | ||
&& ORACLE.disputeStatus(_disputeId) != IOracle.DisputeStatus.Escalated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The finding only says to check against IOracle.DisputeStatus.Escalated
. Does it also need to keep None? What is that case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep we should left the None also, is the other case which the dispute can be voted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@0xShaito @0xJabberwock the None
status means the dispute has not started yet.
There are 2 somewhat realistic scenarios that could lead to a dispute having the None
in this function:
- The ID is incorrect, in which case
ORACLE.createdAt(_disputeId) == 0
effectively duplicates this check. - The dispute was created in a messed up module that somehow called the
updateDisputeStatus
function of the oracle and set an invalid status.
The second point is a bit concerning but the off-chain logic should catch that, so I would remove the None
check.
… fix/dispute-lock
…-modules into fix/dispute-lock
🤖 Linear
Closes GRT-7